

<div class="widget">
	<div class="widgetTitle">
		<h3>Browse By Category</h3>

	</div>
	<!-- /.widgetTitle -->
	<div class="widgetContent">
		<?php foreach($category_parent as $category_parent):?>
		<div class="accordion" id="<?= "C".$category_parent->id; ?>">
			<div class="acc_title">
				<a class="accordion-toggle" data-toggle="collapse"
					data-parent="<?= "#C".$category_parent->id; ?>"
					href="<?= "#".$category_parent->id; ?>">
					<h3>
						<?= $category_parent->name; ?>
					</h3>
				</a>
			</div>

			<!-- /.acc_title -->

			<?php 
					$sub = Categories::where('parent_id','=',$category_parent->id)->get();
					
					if($sub){
				?>
											<div class="acc_content">

												<ul class="list">
												<?php foreach($sub as $sub_category):?>
												<?php 
												$catUrl = Str::slug(Location::get()).'/'.$sub_category->slug;
												?>
													<li class="col-sm-4">  <p class="1smallText text-info" style="font-weight: 300; font-size: 13px"><a href="<?= URL::base()?>/<?= $catUrl;?>"
								title=""> <?= $sub_category->name; ?> </a></p>
													</li>
													
							
							
							
													<?php endforeach;?>
												</ul>

											</div>
											<?php }?>
											<hr class="hr-normal">
											<!-- /.acc_content -->
										</div>
										<?php endforeach;?>
										<!-- /.accordion -->
											<!-- /.accordion -->


									</div>
									<!-- /.widgetContent -->
								</div>
			